import datetime


class Transaction:
    def __init__(self,
                 payer,  # 付款方
                 recer,  # 收款方
                 money):  # 数字货币的数额
        self.payer = payer
        self.recer = recer
        self.money = money
        self.timestamp = datetime.datetime.now()  # 交易时间

    def __repr__(self):
        return str(self.payer) + " pays " + str(self.recer) + \
               " " + str(self.money) + " " + str(self.timestamp)


if __name__ == '__main__':
    t1 = Transaction("x", "y", 1)
    print(t1)
